package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the CUSTOMERINFO database table.
 * 
 */
@Entity
@NamedQuery(name="Customerinfo.findAll", query="SELECT c FROM Customerinfo c")
public class Customerinfo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(initialValue=1,allocationSize=1,name="CUSTOMERINFO_CUSTID_GENERATOR", sequenceName="SEQ_16")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CUSTOMERINFO_CUSTID_GENERATOR")
	@Column(name="CUST_ID")
	private long custId;

	@Column(name="CJUST_KINDS")
	private BigDecimal cjustKinds;

	@Column(name="CUST_ADDRESS")
	private String custAddress;

	@Column(name="CUST_CNAME")
	private String custCname;

	@Temporal(TemporalType.DATE)
	@Column(name="CUST_CREATEDATA3")
	private Date custCreatedata3;

	@Column(name="CUST_CYCLE")
	private BigDecimal custCycle;

	@Column(name="CUST_NAME")
	private String custName;

	@Column(name="CUST_OPERAT")
	private String custOperat;

	@Column(name="CUST_PHONE")
	private String custPhone;

	@Column(name="CUST_REMARKS")
	private String custRemarks;

	@Column(name="CUST_SRC")
	private String custSrc;

	
	@Temporal(TemporalType.DATE)
	@Column(name="CUST_UPDATE")
	private Date custUpdate;

	//bi-directional many-to-one association to ConstactOrder
	@OneToMany(mappedBy="customerinfo")
	private List<ConstactOrder> constactOrders;

	//bi-directional many-to-one association to Contact
	@OneToMany(mappedBy="customerinfo")
	private List<Contact> contacts;

	//bi-directional many-to-one association to Contact
	@ManyToOne
	@JoinColumn(name="CONT_ID")
	private Contact contact;

	//bi-directional many-to-one association to Sharedtransfer
	@ManyToOne
	@JoinColumn(name="ST_ID")
	private Sharedtransfer sharedtransfer;

	//bi-directional many-to-one association to FinancialData
	@OneToMany(mappedBy="customerinfo")
	private List<FinancialData> financialData;

	//bi-directional many-to-one association to Openticketrecord
	@OneToMany(mappedBy="customerinfo")
	private List<Openticketrecord> openticketrecords;

	//bi-directional many-to-one association to Ordercancel
	@OneToMany(mappedBy="customerinfo")
	private List<Ordercancel> ordercancels;

	//bi-directional many-to-one association to Orderdetails1
	@OneToMany(mappedBy="customerinfo")
	private List<Orderdetails1> orderdetails1s;

	//bi-directional many-to-one association to Sendgoodsdetail
	@OneToMany(mappedBy="customerinfo")
	private List<Sendgoodsdetail> sendgoodsdetails;

	//bi-directional many-to-one association to Sendgoodsform
	@OneToMany(mappedBy="customerinfo")
	private List<Sendgoodsform> sendgoodsforms;

	//bi-directional many-to-one association to Sharedtransfer
	@OneToMany(mappedBy="customerinfo")
	private List<Sharedtransfer> sharedtransfers;

	public Customerinfo() {
	}

	public long getCustId() {
		return this.custId;
	}

	public void setCustId(long custId) {
		this.custId = custId;
	}

	public BigDecimal getCjustKinds() {
		return this.cjustKinds;
	}

	public void setCjustKinds(BigDecimal cjustKinds) {
		this.cjustKinds = cjustKinds;
	}

	public String getCustAddress() {
		return this.custAddress;
	}

	public void setCustAddress(String custAddress) {
		this.custAddress = custAddress;
	}

	public String getCustCname() {
		return this.custCname;
	}

	public void setCustCname(String custCname) {
		this.custCname = custCname;
	}

	public Date getCustCreatedata3() {
		return this.custCreatedata3;
	}

	public void setCustCreatedata3(Date custCreatedata3) {
		this.custCreatedata3 = custCreatedata3;
	}

	public BigDecimal getCustCycle() {
		return this.custCycle;
	}

	public void setCustCycle(BigDecimal custCycle) {
		this.custCycle = custCycle;
	}

	public String getCustName() {
		return this.custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}

	public String getCustOperat() {
		return this.custOperat;
	}

	public void setCustOperat(String custOperat) {
		this.custOperat = custOperat;
	}

	public String getCustPhone() {
		return this.custPhone;
	}

	public void setCustPhone(String custPhone) {
		this.custPhone = custPhone;
	}

	public String getCustRemarks() {
		return this.custRemarks;
	}

	public void setCustRemarks(String custRemarks) {
		this.custRemarks = custRemarks;
	}

	public String getCustSrc() {
		return this.custSrc;
	}

	public void setCustSrc(String custSrc) {
		this.custSrc = custSrc;
	}

	public Date getCustUpdate() {
		return this.custUpdate;
	}

	public void setCustUpdate(Date custUpdate) {
		this.custUpdate = custUpdate;
	}

	public List<ConstactOrder> getConstactOrders() {
		return this.constactOrders;
	}

	public void setConstactOrders(List<ConstactOrder> constactOrders) {
		this.constactOrders = constactOrders;
	}

	public ConstactOrder addConstactOrder(ConstactOrder constactOrder) {
		getConstactOrders().add(constactOrder);
		constactOrder.setCustomerinfo(this);

		return constactOrder;
	}

	public ConstactOrder removeConstactOrder(ConstactOrder constactOrder) {
		getConstactOrders().remove(constactOrder);
		constactOrder.setCustomerinfo(null);

		return constactOrder;
	}

	public List<Contact> getContacts() {
		return this.contacts;
	}

	public void setContacts(List<Contact> contacts) {
		this.contacts = contacts;
	}

	public Contact addContact(Contact contact) {
		getContacts().add(contact);
		contact.setCustomerinfo(this);

		return contact;
	}

	public Contact removeContact(Contact contact) {
		getContacts().remove(contact);
		contact.setCustomerinfo(null);

		return contact;
	}

	public Contact getContact() {
		return this.contact;
	}

	public void setContact(Contact contact) {
		this.contact = contact;
	}

	public Sharedtransfer getSharedtransfer() {
		return this.sharedtransfer;
	}

	public void setSharedtransfer(Sharedtransfer sharedtransfer) {
		this.sharedtransfer = sharedtransfer;
	}

	public List<FinancialData> getFinancialData() {
		return this.financialData;
	}

	public void setFinancialData(List<FinancialData> financialData) {
		this.financialData = financialData;
	}

	public FinancialData addFinancialData(FinancialData financialData) {
		getFinancialData().add(financialData);
		financialData.setCustomerinfo(this);

		return financialData;
	}

	public FinancialData removeFinancialData(FinancialData financialData) {
		getFinancialData().remove(financialData);
		financialData.setCustomerinfo(null);

		return financialData;
	}

	public List<Openticketrecord> getOpenticketrecords() {
		return this.openticketrecords;
	}

	public void setOpenticketrecords(List<Openticketrecord> openticketrecords) {
		this.openticketrecords = openticketrecords;
	}

	public Openticketrecord addOpenticketrecord(Openticketrecord openticketrecord) {
		getOpenticketrecords().add(openticketrecord);
		openticketrecord.setCustomerinfo(this);

		return openticketrecord;
	}

	public Openticketrecord removeOpenticketrecord(Openticketrecord openticketrecord) {
		getOpenticketrecords().remove(openticketrecord);
		openticketrecord.setCustomerinfo(null);

		return openticketrecord;
	}

	public List<Ordercancel> getOrdercancels() {
		return this.ordercancels;
	}

	public void setOrdercancels(List<Ordercancel> ordercancels) {
		this.ordercancels = ordercancels;
	}

	public Ordercancel addOrdercancel(Ordercancel ordercancel) {
		getOrdercancels().add(ordercancel);
		ordercancel.setCustomerinfo(this);

		return ordercancel;
	}

	public Ordercancel removeOrdercancel(Ordercancel ordercancel) {
		getOrdercancels().remove(ordercancel);
		ordercancel.setCustomerinfo(null);

		return ordercancel;
	}

	public List<Orderdetails1> getOrderdetails1s() {
		return this.orderdetails1s;
	}

	public void setOrderdetails1s(List<Orderdetails1> orderdetails1s) {
		this.orderdetails1s = orderdetails1s;
	}

	public Orderdetails1 addOrderdetails1(Orderdetails1 orderdetails1) {
		getOrderdetails1s().add(orderdetails1);
		orderdetails1.setCustomerinfo(this);

		return orderdetails1;
	}

	public Orderdetails1 removeOrderdetails1(Orderdetails1 orderdetails1) {
		getOrderdetails1s().remove(orderdetails1);
		orderdetails1.setCustomerinfo(null);

		return orderdetails1;
	}

	public List<Sendgoodsdetail> getSendgoodsdetails() {
		return this.sendgoodsdetails;
	}

	public void setSendgoodsdetails(List<Sendgoodsdetail> sendgoodsdetails) {
		this.sendgoodsdetails = sendgoodsdetails;
	}

	public Sendgoodsdetail addSendgoodsdetail(Sendgoodsdetail sendgoodsdetail) {
		getSendgoodsdetails().add(sendgoodsdetail);
		sendgoodsdetail.setCustomerinfo(this);

		return sendgoodsdetail;
	}

	public Sendgoodsdetail removeSendgoodsdetail(Sendgoodsdetail sendgoodsdetail) {
		getSendgoodsdetails().remove(sendgoodsdetail);
		sendgoodsdetail.setCustomerinfo(null);

		return sendgoodsdetail;
	}

	public List<Sendgoodsform> getSendgoodsforms() {
		return this.sendgoodsforms;
	}

	public void setSendgoodsforms(List<Sendgoodsform> sendgoodsforms) {
		this.sendgoodsforms = sendgoodsforms;
	}

	public Sendgoodsform addSendgoodsform(Sendgoodsform sendgoodsform) {
		getSendgoodsforms().add(sendgoodsform);
		sendgoodsform.setCustomerinfo(this);

		return sendgoodsform;
	}

	public Sendgoodsform removeSendgoodsform(Sendgoodsform sendgoodsform) {
		getSendgoodsforms().remove(sendgoodsform);
		sendgoodsform.setCustomerinfo(null);

		return sendgoodsform;
	}

	public List<Sharedtransfer> getSharedtransfers() {
		return this.sharedtransfers;
	}

	public void setSharedtransfers(List<Sharedtransfer> sharedtransfers) {
		this.sharedtransfers = sharedtransfers;
	}

	public Sharedtransfer addSharedtransfer(Sharedtransfer sharedtransfer) {
		getSharedtransfers().add(sharedtransfer);
		sharedtransfer.setCustomerinfo(this);

		return sharedtransfer;
	}

	public Sharedtransfer removeSharedtransfer(Sharedtransfer sharedtransfer) {
		getSharedtransfers().remove(sharedtransfer);
		sharedtransfer.setCustomerinfo(null);

		return sharedtransfer;
	}


	

	

	


	public Customerinfo(long custId, BigDecimal cjustKinds, String custAddress, String custCname, Date custCreatedata3,
			BigDecimal custCycle, String custName, String custOperat, String custPhone, String custRemarks,
			String custSrc, Date custUpdate) {
		super();
		this.custId = custId;
		this.cjustKinds = cjustKinds;
		this.custAddress = custAddress;
		this.custCname = custCname;
		this.custCreatedata3 = custCreatedata3;
		this.custCycle = custCycle;
		this.custName = custName;
		this.custOperat = custOperat;
		this.custPhone = custPhone;
		this.custRemarks = custRemarks;
		this.custSrc = custSrc;
		this.custUpdate = custUpdate;
	}

	
	@Override
	public String toString() {
		return "Customerinfo [custId=" + custId + ", cjustKinds=" + cjustKinds + ", custAddress=" + custAddress
				+ ", custCname=" + custCname + ", custCreatedata3=" + custCreatedata3 + ", custCycle=" + custCycle
				+ ", custName=" + custName + ", custOperat=" + custOperat + ", custPhone=" + custPhone
				+ ", custRemarks=" + custRemarks + ", custSrc=" + custSrc + ", custUpdate=" + custUpdate
				+ ", openticketrecords=" + openticketrecords + "]";
	}





	

}